<?php

namespace Tbf\Bundle\PackageBundle\Annotation;

class AnnotationCollection
{
    protected $annotation=array();
    public function addAnnotation(Annotation $annotation)
    {
        $this->annotation[] = $annotation;
    }
    public function getDocblock()
    {
        $output = "/**\n";
        foreach ($this->annotation as $annotation) {
            $output .= ' * '.(string) $annotation."\n";
        }
        $output .= ' */'."\n";

        return $output;
    }
    public function all()
    {
        return $this->annotation;
    }
}
